/*技能介绍*/
//进度条
var bar = document.querySelectorAll(".progress-bar");

/*返回顶部*/
var t = document.querySelector(".fh");
console.log(t);
window.onscroll =function () {
    var height = document.documentElement.scrollTop || document.body.scrollTop;
    console.log(height);
    if (document.documentElement.scrollTop > 1500 || document.body.scrollTop > 1500) {
        t.style.display = "block";
    } else {
        t.style.display = "none";
    }
    t.addEventListener('click', function () {
        // window.scrollTo(0,0);
        window.scrollTo({
            top: 0,
            behavior: 'smooth'
        })
    })


    //进度条
    for (var i = 0; i < bar.length; i++) {
        if (height >= 1300) {
            bar[0].style.width = '95%';
            bar[1].style.width = '90%';
            bar[2].style.width = '60%';
            bar[3].style.width = '55%';
            bar[4].style.width = '65%';
            bar[5].style.width = '70%';
        } else {
            bar[i].style.width = '0%';
        }
    }
}


/*作品轮播*/
var swiper = new Swiper('.swiper-container', {
    slidesPerView: 3,
    spaceBetween: 30,
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
});